
function appendCity1()
{
	$('#city').empty();
	$('#contry').empty();
	$('#city').append('<select id="s_city" name="cityid" class="am-inline"'
							+ 'style="width: 27%" onclick="changeplace1(this)"></select>&nbsp;&nbsp;');
}
function appendContry1()
{
	$('#district').empty();
	$('#district').append(
					'<select id="s_country" name="districtid" class="am-inline"'
							+ 'style="width: 27%" onclick="changeplace1(this)" required></select>');

}

function changeplace1(select) {

	if (select.id == 's_province') {
		
		if(province!=select.value)
			{
			 province=select.value;
			 city=select.value.substring(0,2)+"0100";
			 country=select.value.substring(0,2)+"0101";
		 appendCity1();
		getPlaceList(domain + '/api/cityCode/getCities.do', 's_city', {
			'Province' : $('#s_province').val()
		},$('#s_province').val().substring(0,2)+"0100");
		appendContry1();
		getPlaceList(domain + '/api/cityCode/getCountries.do', 's_country', {
			'City' : $('#s_province').val().substring(0,2)+"01"
		}, $('#s_province').val().substring(0,2)+"0101");
			}

	} else if (select.id == 's_city') {
		if(city!=select.value)
			{
			 city=select.value;;
			 country=select.value.substring(0,4)+"01";
		appendContry1();
		getPlaceList(domain + '/api/cityCode/getCountries.do', 's_country', {
			'City' : $('#s_city').val()
		}, $('#s_province').val().substring(0,4)+"01");
			}
	}
}
function placeInit1() {
	var districtid="500101";
	getPlaceList(domain + '/api/cityCode/getProvince.do', 's_province', {},districtid.substring(0,2)+"0000" );
   
	appendCity1();
	getPlaceList(domain + '/api/cityCode/getCities.do', 's_city', {'Province':districtid.substring(0,2)+"0000"},curruntCity.substring(0,4)+"00" );
	appendContry1();
	getPlaceList(domain + '/api/cityCode/getCountries.do', 's_country',{'City':districtid.substring(0,4)+"00"},districtid );
	
}